﻿using System;
using System.Collections.Generic;

namespace Utility
{
	// Token: 0x02000638 RID: 1592
	public static class ListExtensions
	{
		// Token: 0x0600260B RID: 9739 RVA: 0x001466B4 File Offset: 0x001448B4
		public static T Peek<T>(this IList<T> self)
		{
			return self[0];
		}

		// Token: 0x0600260C RID: 9740 RVA: 0x001466C0 File Offset: 0x001448C0
		public static T Pop<T>(this IList<T> self)
		{
			T result = self[0];
			self.RemoveAt(0);
			return result;
		}

		// Token: 0x0600260D RID: 9741 RVA: 0x001466E0 File Offset: 0x001448E0
		public static void Push<T>(this IList<T> self, T item)
		{
			self.Insert(0, item);
		}

		// Token: 0x0600260E RID: 9742 RVA: 0x001466EC File Offset: 0x001448EC
		public static T Dequeue<T>(this IList<T> self)
		{
			T result = self[0];
			self.RemoveAt(0);
			return result;
		}

		// Token: 0x0600260F RID: 9743 RVA: 0x0014670C File Offset: 0x0014490C
		public static void Enqueue<T>(this IList<T> self, T item)
		{
			self.Add(item);
		}
	}
}
